package org.jimmy.tang.designpattern.behavior.observer;

/**
 * @author jimmy
 * 
 */
public class TianHeCitizen extends Citizen {
    public TianHeCitizen(Policeman pol) {
        setPolicemen();
        register(pol);
    }

    /* (non-Javadoc)
     * @see org.jimmy.tang.designpattern.behavior.observer.Citizen#sendMessage(java.lang.String)
     */
    @Override
    void sendMessage(String help) {
        setHelp(help);
        for (int i = 0; i < pols.size(); i++) {
            Policeman pol = pols.get(i);

            pol.action(this);
        }

    }

}
